package com.skypan.myapplication.fragment;

import android.content.Intent;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import com.lidroid.xutils.view.annotation.ViewInject;
import com.lidroid.xutils.view.annotation.event.OnClick;
import com.skypan.myapplication.LoginActivity;
import com.skypan.myapplication.MyConfirmActivity;
import com.skypan.myapplication.MyReadActivity;
import com.skypan.myapplication.MydataActivity;
import com.skypan.myapplication.R;
import com.skypan.myapplication.widget.Contants;


public class MineFragment extends BaseFragment {

    @ViewInject(R.id.btn_logout)
    private Button btnlogout;
    @ViewInject(R.id.txt_my_data)
    private TextView txtmydata;
    @ViewInject(R.id.txt_my_confirm)
    private TextView txtmyconfirm;
    @ViewInject(R.id.txt_my_read)
    private TextView txtmyread;

    @Override
    public View createView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        return  inflater.inflate(R.layout.fragment_mine,container,false);
    }

    @Override
    public void init() {

    }

    @OnClick(R.id.btn_logout)   //退出
    public void logout(View view){
        Intent intent = new Intent(getContext(), LoginActivity.class);
        startActivityForResult(intent, Contants.REQUEST_CODE);
    }
    @OnClick(R.id.txt_my_data) //跳转到我的资料
    public void mydata(View view) {
        Intent intent = new Intent(getContext(), MydataActivity.class);
        startActivityForResult(intent, Contants.REQUEST_CODE);
    }
    @OnClick(R.id.txt_my_confirm) //跳转到我的认证
    public void myconfirm(View view) {
        Intent intent = new Intent(getContext(), MyConfirmActivity.class);
        startActivityForResult(intent, Contants.REQUEST_CODE);
    }
    @OnClick(R.id.txt_my_read) //跳转到我的追溯
    public void myread(View view) {
        Intent intent = new Intent(getContext(), MyReadActivity.class);
        startActivityForResult(intent, Contants.REQUEST_CODE);
    }


}
